<?php
include_once("include.inc.php");
$sql = "SELECT songID,catalogue FROM tbl_song WHERE songID >=120000 AND songID <=120000";
if($result = $conn->Execute($sql)){
	$i = 0;
	while($arrRow = $result->FetchRow()){
                $songID  = $arrRow['songID'];
                $songUrl = $arrRow['catalogue'];
                $m = floor(($songID-100001)/20000);
                $a = floor(($songID-100001)/1000); 
		//echo $arrRow['songID'].'<br>';
		//http://61.164.49.108/m2/a21/121301.wmv
		$upsql = "UPDATE tbl_song SET catalogue='http://202.91.248.60/m$m/a$a/".$arrRow['songID'].".wmv' WHERE songID=".$arrRow['songID'];
		$conn->Execute($upsql);
		echo $upsql.';<br>';
		$i++;
	}
	echo $i;
}
?>
